<include file="public/header"/>
<div class="am-cf admin-main">
<include file="public/sidebar"/>
<!-- content start -->
<div class="admin-content">
<div class="am-cf am-padding">
    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">订单详情</strong>
    </div>
</div>
<div class="am-tabs am-margin" data-am-tabs>
<ul class="am-tabs-nav am-nav am-nav-tabs">
    <li class="am-active"><a href="#tab1">商品详情</a></li>
    <li><a href="#tab2">操作详情</a></li>
</ul>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in am-active" id="tab1">
<foreach name="datas" item="data">
<hr style="border-top: 1px solid #0e90d2;"/>
<div class="am-margin-top">
    <div class="am-u-sm-2 am-text-right">
        <if condition="$data.status eq 1">
            <img src="__PUBLIC__/img/order.jpg" style="width: 20px;height: 20px"/>
            <else/>
            <img src="__PUBLIC__/img/order2.jpg" style="width: 20px;height: 20px"/>
        </if>
        编号
    </div>
    <div class="am-u-sm-4 am-u-end">
        <p style="color:#d20c10; ">{$data.ordernum2}</p>
    </div>
</div>
<!--返工-->
<form class="am-form" method="post" action="__URL__/../Order/return_order/id/{$data.oid}">
    <div class="am-g am-margin-top">
        <div class="am-u-sm-4">
            <if condition="session('role') eq 0">
                <if condition="$data.status eq 3 || $data.status eq 4">
                    <input type="button" class="{$data.oid}" onclick="fg(this.className)" value="返工"/>
                    <div id="{$data.oid}" class="fg-div" style="border: 1px dashed #CCCCCC; display:none">
                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-2 am-text-right">
                                返工理由
                            </div>
                            <div class="am-u-sm-7">
                                <textarea rows="5" placeholder="" name="return"></textarea>
                            </div>
                        </div>
                        <input type="submit" name="" value="提交" class="am-btn am-btn-primary am-btn-sm am-fl">
                    </div>
                    <elseif condition="$data.status eq 5"/>
                    <span style="color: #ff0000;">返工单</span>
                </if>
            </if>
        </div>
    </div>
</form>
<!--返工end-->

<form class="am-form" name="form2" method="post" action="__URL__/../Order/xgOrder/id/{$data.oid}/type/{$data.pro_id}">
<if condition="$data.collar_type neq null">
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            衬衫面料
        </div>
        <div class="am-u-sm-4 am-u-end">
            <input type="text" class="am-input-sm" name="color" value="{$data.color}">
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            领型
        </div>
        <div class="am-u-sm-4">
            <select id="collar_type" name="collar_type">
                <option value="{$data.collar_type}">{$data.collar_type}</option>
                <option value="一字">一字</option>
                <option value="温莎">温莎</option>
                <option value="八字">八字</option>
                <option value="暗扣">暗扣</option>
                <option value="双扣八字">双扣八字</option>
                <option value="小方领">小方领</option>
                <option value="钉扣">钉扣</option>
                <option value="立领">立领</option>
                <option value="常尖">常尖</option>
                <option value="女士尖领">
                    女士尖领
                </option>
                <option value="Tab">Tab</option>
                <option value="其它">其它</option>
            </select>
        </div>
    </div>
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            袖型
        </div>
        <div class="am-u-sm-4 am-u-end">
            <select name="sleeve_type">
                <option value="{$data.sleeve_type}">{$data.sleeve_type}</option>
                <option value="单扣圆角">单扣圆角</option>
                <option value="单扣截角">单扣截角</option>
                <option value="单扣直角">单扣直角</option>
                <option value="双扣圆角">双扣圆角</option>
                <option value="双扣截角">双扣截角</option>
                <option value="双扣平角">双扣直角</option>
                <option value="法式圆角">法式圆角</option>
                <option value="法式截角">法式截角</option>
                <option value="法式平角">法式直角</option>
                <option value="短袖">短袖</option>
                <option value="其它">其它</option>
            </select>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            门襟
        </div>
        <div class="am-u-sm-4">
            <select id="front_fly" name="front_fly">
                <option value="{$data.front_fly}">{$data.front_fly}</option>
                <option value="翻门襟">翻门襟</option>
                <option value="平门襟">平门襟</option>
                <option value="暗门襟">暗门襟</option>
                <option value="其它">其它</option>
            </select>
        </div>
    </div>
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            口袋
        </div>
        <div class="am-u-sm-4 am-u-end">
            <select id="pocket" name="pocket">
                <option value="{$data.pocket}">{$data.pocket}</option>
                <option value="无口袋">无口袋</option>
                <option value="有口袋">有口袋</option>
            </select>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">类型选择</div>
        <div class="am-u-sm-4 col-end">
            <select id="select" name="select">
                <option value="{$data.type}">{$data.type}</option>
                <option value="合体">合体</option>
                <option value="修身">修身</option>
                <option value="宽松">宽松</option>
                <option value="其它">其它</option>
            </select>
        </div>
    </div>
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">数量</div>
        <div class="am-u-sm-4 am-u-end">
            <select name="num">
                <option value="{$data.num}">{$data.num}</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
            </select>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">衬衫类型</div>
        <div class="am-u-sm-4 col-end">
            <select name="xf_type">
                <option value="{$data.xf_type}">{$data.xf_type}</option>
                <option value="长袖衬衫">长袖衬衫</option>
                <option value="短袖衬衫">短袖衬衫</option>
            </select>
        </div>
    </div>
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">性别</div>
        <div class="am-u-sm-4 am-u-end">
            <select name="sex">
                <option value="{$data.sex}">{$data.sex}</option>
                <option value="男士">男士</option>
                <option value="女士">女士</option>
            </select>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">做工</div>
        <div class="am-u-sm-4 col-end">
            <select name="zuo">
                <option value="{$data.zuo}">{$data.zuo}</option>
                <option value="精做">精做</option>
                <option value="标准做">标准做</option>
                <option value="超精做">超精做</option>
            </select>
        </div>
    </div>
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">价格</div>
        <div class="am-u-sm-4 am-u-end">
            <input type="text" class="am-input-sm" name="price" value="{$data.price}">
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">定金</div>
        <div class="am-u-sm-4 col-end">
            <input type="text" class="am-input-sm" name="dj" value="{$data.dj}">
        </div>
    </div>
</if>
<!--西服-->
<if condition="$data.lapel neq null">
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            西服面料
        </div>
        <div class="am-u-sm-4 am-u-end">
            <input type="text" class="am-input-sm" id="xf_color" name="xf_color" value="{$data.xf_color}">
        </div>
    </div>
    <if condition="($data.xf_type neq '西裤') OR ($data.xf_type neq '裙子')">
        <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">
                驳头
            </div>
            <div class="am-u-sm-4 col-end">
                <select id="lapel" name="lapel">
                    <option value="{$data.lapel}">{$data.lapel}</option>
                    <option value="平驳头">平驳头</option>
                    <option value="枪驳领">枪驳领</option>
                </select>
            </div>
        </div>
        <div class="am-margin-top">
            <div class="am-u-sm-2 am-text-right">
                驳头宽
            </div>
            <div class="am-u-sm-4 am-u-end">
                <input type="text" class="am-input-sm" id="lapel_width" name="lapel_width" value="{$data.lapel_width}"/>
            </div>
        </div>
        <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">开叉</div>
            <div class="am-u-sm-4 col-end">
                <select name="jag">
                    <option value="{$data.jag}">{$data.jag}</option>
                    <option value="双叉">双叉</option>
                    <option value="单叉">单叉</option>
                    <option value="不开叉">不开叉</option>
                </select>
            </div>
        </div>
        <div class="am-margin-top">
            <div class="am-u-sm-2 am-text-right">袖口叉</div>
            <div class="am-u-sm-4 am-u-end">
                <select id="sleeve_fork" name="sleeve_fork">
                    <option value="{$data.sleeve_fork}">{$data.sleeve_fork}</option>
                    <option value="假叉">假叉</option>
                    <option value="真叉">真叉</option>
                </select>
            </div>
        </div>
        <div class="am-g am-margin-top">
            <div class="am-u-sm-2 am-text-right">口袋</div>
            <div class="am-u-sm-4 col-end">
                <select id="xf_pocket" name="xf_pocket">
                    <option value="{$data.xf_pocket}">{$data.xf_pocket}</option>
                    <option value="带盖">带盖</option>
                    <option value="不带盖">不带盖</option>
                    <option value="明口袋">明口袋</option>
                </select>
            </div>
        </div>
        <div class="am-margin-top">
            <div class="am-u-sm-2 am-text-right">纽扣</div>
            <div class="am-u-sm-4 am-u-end">
                <input type="text" class="am-input-sm" name="fastener" value="{$data.fastener}"/>
            </div>
        </div>
    </if>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">数量</div>
        <div class="am-u-sm-4 col-end">
            <select id="xf_num" name="xf_num">
                <option value="{$data.xf_num}">{$data.xf_num}</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
            </select>
        </div>
    </div>
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">类型</div>
        <div class="am-u-sm-4 am-u-end">
            <select id="xf_type" name="xf_type">
                <option value="{$data.xf_type}">{$data.xf_type}</option>
                <option value="套西">套西</option>
                <option value="单西">单西</option>
                <option value="西裤">西裤</option>
                <option value="裙子">裙子</option>
            </select>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">性别</div>
        <div class="am-u-sm-4 col-end">
            <select id="sex" name="sex">
                <option value="{$data.sex}">{$data.sex}</option>
                <option value="男士">男士</option>
                <option value="女士">女士</option>
            </select>
        </div>
    </div>
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">做工</div>
        <div class="am-u-sm-4 am-u-end">
            <select name="zuo">
                <option value="{$data.zuo}">{$data.zuo}</option>
                <option value="精做">精做</option>
                <option value="标准做">标准做</option>
                <option value="超精做">超精做</option>
            </select>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">价格</div>
        <div class="am-u-sm-4 col-end">
            <input type="text" class="am-input-sm" name="price"  value="{$data.price}"/>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">定金</div>
        <div class="am-u-sm-4 am-u-end">
            <input type="text" class="am-input-sm" name="dj" value="{$data.dj}"/>
        </div>
    </div>
</if>
<!--裙子-->
<if condition="$data.pro_id eq 7">
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            裙子面料
        </div>
        <div class="am-u-sm-4 am-u-end">
            <input type="text" class="am-input-sm" id="color" name="color" value="{$data.color}">
        </div>
    </div>

    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            拉链
        </div>
        <div class="am-u-sm-4">
            <select id="sleeve_type" name="sleeve_type">
                <option value="{$data.sleeve_type}">{$data.sleeve_type}</option>
                <option value="后拉链">后拉链</option>
                <option value="右侧拉链">右侧拉链</option>
            </select>
        </div>
    </div>
    <div class="am-margin-top">
        <div class="am-u-sm-2 am-text-right">
            开叉
        </div>
        <div class="am-u-sm-4 am-u-end">
            <select id="jag" name="jag">
                <option value="{$data.jag}">{$data.jag}</option>
                <option value="开叉">开叉</option>
                <option value="不开叉">不开叉</option>
                <option value="其他">其他</option>
            </select>
        </div>
    </div>

    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">数量</div>
        <div class="am-u-sm-4 col-end">
            <select id="num" name="num">
                <option value="{$data.num}">{$data.num}</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
            </select>
        </div>
    </div>

    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">做工</div>
        <div class="am-u-sm-4 am-u-end">
            <select id="zuo" name="zuo">
                <option value="{$data.zuo}">{$data.zuo}</option>
                <option value="精做">精做</option>
                <option value="标准做">标准做</option>
                <option value="超精做">超精做</option>
            </select>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">价格</div>
        <div class="am-u-sm-4 am-u-end">
            <input type="text" class="am-input-sm" name="price"  value="{$data.price}"/>
        </div>
    </div>
    <div class="am-g am-margin-top">
        <div class="am-u-sm-2 am-text-right">定金</div>
        <div class="am-u-sm-4 am-u-end">
            <input type="text" class="am-input-sm" name="dj" value="{$data.dj}"/>
        </div>
    </div>
</if>
<div class="am-g am-margin-top-sm">
    <div class="am-u-sm-2 am-text-right">
        <if condition="$data.status eq 5">
            返工理由
            <else/>
            备注
        </if>
    </div>
    <div class="am-u-sm-7 am-u-end">
        <textarea rows="5" placeholder="" id="descr2" name="descr2">{$data.descr2}</textarea>
    </div>
</div>

<div class="am-g am-margin">
    <input type="submit" name="" value="修改" class="am-btn am-btn-primary am-btn-sm am-fl">
</div>
</form>
</foreach>
</div>
</div>
</div>
</div>
<!-- content end -->
</div>
<script>
    function fg(id) {
        document.getElementById(id).style.display = (document.getElementById(id).style.display == 'none') ? '' : 'none';
    }
    function process(v) {
        if (v == "xgOrder") {
            document.form2.action = "__URL__/../Order/xgOrder/id/{$data.oid}/type/{$data.pro_id}";
        } else {
            document.form2.action = "";
        }
    }
</script>
<include file="public/footer"/>
